﻿//===================================================================
// 西交通开发框架-XCI.Parent 2019 版权所有     
//===================================================================
using System;
using System.ComponentModel.DataAnnotations;
using XCI.Data.Entity;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统字典
    /// </summary>
    [Table("系统字典")]
    public class SysDic
    {
        /// <summary>
        /// 字典主键
        /// </summary>
        [Primary]
        [Column("字典主键", false)]
        public string Id { get; set; }

        /// <summary>
        /// 字典类型编码
        /// </summary>
        [Column("字典类型编码")]
        [Required(ErrorMessage = "请输入字典类型编码")]
        [StringLength(100, ErrorMessage = "字典类型编码不能超过100个字符")]
        public string Code { get; set; }

        /// <summary>
        /// 字典名称
        /// </summary>
        [Column("字典名称")]
        [Required(ErrorMessage = "请输入字典名称")]
        [StringLength(100, ErrorMessage = "字典名称不能超过100个字符")]
        public string Name { get; set; }

        /// <summary>
        /// 字典值
        /// </summary>
        [Column("字典值")]
        [Required(ErrorMessage = "请输入字典值")]
        [StringLength(500, ErrorMessage = "字典值不能超过500个字符")]
        public string Value { get; set; }

        /// <summary>
        /// 字典名称简拼
        /// </summary>
        [Column("字典名称简拼", false)]
        [StringLength(100, ErrorMessage = "字典名称简拼不能超过100个字符")]
        public string Spell { get; set; }

        /// <summary>
        /// 排序行号
        /// </summary>
        [Column("排序行号")]
        public int? Path { get; set; }

        /// <summary>
        /// 状态(0:禁用;1:启用)
        /// </summary>
        [Column("状态")]
        public bool? Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("备注")]
        [StringLength(500, ErrorMessage = "备注不能超过500个字符")]
        public string Remark { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysDic Clone()
        {
            return (SysDic)MemberwiseClone();
        }
    }
}
